<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<jsp:include page="../head.jsp"></jsp:include>
<html>
<body>
<form id='fmTbCompany'  action='TbCompanyServlet?method=${sessionScope.tbCompany==null?'add':'edit'}' method='post'>
 <input type="hidden" name="companyId" id="companyId" value="${sessionScope.tbCompany.companyId}" />
<table>
<tr><td colspan='2'></td></tr>
<tr>
    <td>企业代码</td>
    <td><input type='text' name='companyCode' id='companyCode' value='${sessionScope.tbCompany.companyCode }' /></td>
</tr>
<tr>
    <td>企业类型</td>
    <td>
	    <c:forEach items="${sessionScope.tbCompanyTypeListAll}" var="tbCompanyTypeAll" varStatus="status">
	    <c:set var="cflags" value=""/>
	        <c:forEach items="${sessionScope.tbCompany.tbCompanyTypeList}" var="tbCompanyType" varStatus="status">
		     <c:if test="${tbCompanyType.companyTypeId== tbCompanyTypeAll.companyTypeId}"><c:set var="cflags" value=" checked "/></c:if>
			</c:forEach>
			<input type="checkbox" name="companyTypeId" value="${tbCompanyTypeAll.companyTypeId}" } <c:out value="${cflags }"/> />
			${tbCompanyTypeAll.companyTypeName}
     	</c:forEach>
	</td>
</tr>
<tr>
    <td>企业名称</td>
    <td><input type='text' name='companyName' id='companyName' value='${sessionScope.tbCompany.companyName }' /></td>
</tr>
<tr>
    <td>开户银行</td>
    <td><input type='text' name='bankName' id='bankName' value='${sessionScope.tbCompany.bankName }' /></td>
</tr>
<tr>
    <td>开户人姓名</td>
    <td><input type='text' name='bankUser' id='bankUser' value='${sessionScope.tbCompany.bankUser }' /></td>
</tr>
<tr>
    <td>银行卡号</td>
    <td><input type='text' name='bankCard' id='bankCard' value='${sessionScope.tbCompany.bankCard }' /></td>
</tr>
<tr>
    <td>企业地址</td>
    <td><input type='text' name='companyAddress' id='companyAddress' value='${sessionScope.tbCompany.companyAddress }' /></td>
</tr>
<tr>
    <td>企业联系人</td>
    <td><input type='text' name='companyContactList' id='companyContactList' value='${sessionScope.tbCompany.companyContactList }' /></td>
</tr>
<tr>
    <td>联系人手机</td>
    <td><input type='text' name='companyMobile' id='companyMobile' value='${sessionScope.tbCompany.companyMobile }' /></td>
</tr>
<tr>
    <td>企业创建时间</td>
    <td><input type='text' name='companyCreateTime' id='companyCreateTime' class="Wdate" size="20" readonly onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" value='${sessionScope.tbCompany.companyCreateTime }' /></td>
</tr>
<tr>
    <td>企业人数</td>
    <td><input type='text' name='companyManScale' id='companyManScale' value='${sessionScope.tbCompany.companyManScale }' /></td>
</tr>
<tr>
    <td>企业信用级别</td>
    <td>
    <select name='creditRatingId' id='creditRatingId' >
    <option value='0' selected >无</option>
	<c:forEach items="${sessionScope.tbCreditRatingList}" var="tbCreditRating" varStatus="status">
		<option value='${tbCreditRating.creditRatingId }' ${tbCreditRating.creditRatingId==sessionScope.tbCompany.creditRatingId?' selected ':''} >${tbCreditRating.creditRatingScore }</option>
	</c:forEach>
</select>
</tr>
<tr>
    <td>备注</td>
    <td><textarea  name='companyMemo' id='companyMemo' cols='80' rows='5'>${sessionScope.tbCompany.companyMemo }</textarea></td>
</tr>

<tr>
    <td  colspan='2' align="center"><input type="submit" name="btsubmit" id="btsubmit" value="${sessionScope.tbCompany==null?'添加':'修改'}" /><input type='reset' value='重置' /><input type='button' value='返回' onclick='history.go(-1);' /></td>
</tr></table>
</form><jsp:include page="../foot.jsp"></jsp:include>
</body></html>